package com.Algorithm.HUAWEI.one20211020;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: zjz
 * @Date: 2022/02/25/9:57
 * @Description:
 * @Target:
 */
public class 字符串分隔 {
    /*
    *
    * abc
    123456789
    *
    * */


    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()){
            addZero(in.nextLine(),8);
        }


    }


    // 做一個加0的方法,小於8就加0，
    static void addZero(String ss,int n){
        if (ss.length()>n){
            ArrayList<String> strings = splitString(ss, n);
            for (int i = 0; i < strings.size(); i++) {


                if (i==strings.size()-1){
                    System.out.print(strings.get(i));
                    for (int k = 0; k < n-strings.get(i).length(); k++) {
                        System.out.print("0");
                    }
                    System.out.println();
                }else {
                    System.out.println(strings.get(i));
                }



            }
        }else {
            System.out.print(ss);
            for (int i = 0; i < n-ss.length(); i++) {
                System.out.print("0");
            }
            System.out.println();
        }
    }
    // 字符串切分方法
    static ArrayList<String> splitString(String ss, int n){
        ArrayList<String> arrayList = new ArrayList<>();
        while (ss.length()>n){
            arrayList.add(ss.substring(0,n));
            ss = ss.substring(n);
        }

        arrayList.add(ss);

        return arrayList;
    }

}
